package com.xunqi.activemq.broker;

import org.apache.activemq.broker.BrokerService;

/**
 * @Description:
 * @Created: with IntelliJ IDEA.
 * @author: 夏沫止水
 * @createTime: 2020-06-22 20:08
 **/
public class EmbedBroker {

    public static void main(String[] args) throws Exception {

        //ActiveMQ也支持在vm中通信基于嵌入的broker
        BrokerService brokerService = new BrokerService();
        brokerService.setUseJmx(true);
        brokerService.addConnector("tcp://localhost:61616");
        brokerService.start();


    }

}
